package testDAO;/*
@author joker
@create 2022-03-11 21:43
*/

import BIZ.UserBiz;
import BIZ.statementofncomeBiz;
import BIZ.totalFeeBiz;
import DAO.StatementOfIncomeDAO;
import DAO.TotalFeeDAO;
import DAO.UserDetailsDAO;
import javabean.userDetails;
import org.junit.Test;

import java.util.List;

public class testUser {
    @Test
    public static void main(String[] args) {
//        UserDetailsDAO userDao = new UserDetailsDAO();
//
        StatementOfIncomeDAO statementOfIncomeDAO = new StatementOfIncomeDAO();
        UserDetailsDAO userDetailsDAO = new UserDetailsDAO();
        TotalFeeDAO totalFeeDAO = new TotalFeeDAO();
        statementofncomeBiz statementofncomeBiz=new statementofncomeBiz();
        UserBiz userBiz=new UserBiz();
        totalFeeBiz totalFeeBiz=new totalFeeBiz();
//        String newbalance= statementofncomeBiz.Refund("1523662","777");
////        boolean refund = userDetailsDAO.UpdateBalance("60", "1523662");

//        statementofncomeBiz statementofncomeBiz = new statementofncomeBiz();

        String a11;

        List<userDetails> aa = userDetailsDAO.getAllUsers();
        System.out.println(aa);
        for (int i = 0; i < aa.size(); i++) {

            System.out.println(aa.get(i).getUserId() +" "+aa.get(i).getPassword()+" "+aa.get(i).getPhone()+" "+aa.get(i).getEmail()+" "+aa.get(i)
                    .getCarId1()+ " "+ aa.get(i).getCarId2()+" "+aa.get(i).getCarId3()+" "+aa.get(i).getRegistrationDate()+" "+aa.get(i).getRemainingDays()
            +" "+aa.get(i).getRemainingDegrees()+" "+aa.get(i).getAccountBalance()+" "+aa.get(i).getStatus());

        }

//        boolean x=userBiz.changeremaindayordegree("11","0","15236625557","100");
//        boolean x=userBiz.changeremaindayordegree("5","1","aaa","100");

//        System.out.println((totalFeeDAO.getTotalFee()+""));
//        System.out.println((totalFeeDAO.getRefund()+""));
//        System.out.println((totalFeeDAO.getMonthIncome()+""));
//        System.out.println((totalFeeDAO.getTimesIncome()+""));


//        Boolean User = userBiz.ChangePassword("Aa12345", "1523662");
//        boolean changephone = userBiz.ChangePhone("15238491871", "1523662");
//        int changeEmail = userBiz.ChangeEmail("117@qq.com", "1523662");



//        String newbalance = statementofncomeBiz.confirmcharge("1523662", "20");
//
//        //将充值的总数额递到total
//        int x = totalFeeBiz.aadincome("20");
//
//        //进行账单插入
//        int addbill = statementofncomeBiz.addbill("1523662", "yuP123", null, null, "20");
//      int  managercar1 = userBiz.ChangeCar1("11111111", "aaa");
//
//        String CarNumber1 = userBiz.getCarId1("aaa");
//
//        String CarNumber2 = userBiz.getCarId2("aaa");
//
//        String  CarNumber3 = userBiz.getCarId3("aaa");
//        System.out.println(CarNumber1+CarNumber2+CarNumber3);
//        long User = userBiz.reg("yxy", "123456Yxy", "15238491871", "11@qq.com", "nb666", "0");
//        String newbalance = statementofncomeBiz.Refundorcost("aaa", "10");
//
//        //将退费后的总数额递到total
//        int x = totalFeeBiz.subincome("10");
//        String x = userBiz.addremain1("2", "1523662", "10", "豫AGB333", null, null, "1");



    }
}
